GXMapShape
You can use theGXMapShape
function to apply an arbitrary mapping matrix to a shape.
void GXMapShape(gxShape target, const gxMapping *map);
target
- A reference to the shape you want to apply the mapping to.
map
- A pointer to a mapping structure containing the matrix you want to apply to the target shape.
DESCRIPTION
TheGXMapShape
function applies to the target shape the mapping transformations represented by the mapping matrix pointed to by the map parameter.This function applies the mapping in one of two ways:
The target shape can be any shape type. However, if the target shape is an empty
- If the target shape's
gxMapTransformShape
attribute is cleared, the function applies the mapping matrix directly to the points of the shape's geometry.- If the target shape's
gxMapTransformShape
attribute is set, this function is identical to theGXMapTransform
function; it concatenates the target shape's transform mapping with the mapping matrix pointed to by themap
parameter. If the target shape shares its transform object with other shapes, QuickDraw GX makes a copy of the transform object, associates the copy with the target shape, and makes changes to the copy.
shape, a full shape, or a picture shape, this function has no effect unless the shape'sgxMapTransformShape
attribute is set.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil shape_access_not_allowed (debugging version) Warnings map_shape_out_of_range graphic_type_cannot_be_moved Notices (debugging version) mapping_unaffected SEE ALSO
To apply a mapping matrix to the mapping property of a transform object, you can also use theGXMapTransform
function, described on page 6-64.